<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body{background: whitesmoke;}
        #img{width: auto;height:auto}
    </style>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
          integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
            integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
</head>
<body>
    <h2>电影信息</h2>
    <?php
    session_start();
    include 'query_mysql.php';
    $qm=new query_mysql();
    $_SESSION['film_id']=$_REQUEST['film_id'];
    if ($_SESSION['is_logged']==0)
        echo "未登录<br>";
    else
        echo "已登录<br>";
    $film_id=$_SESSION['film_id'];
    $conn=mysqli_connect('127.0.0.1','root','123456','tpp');
    $sql_txt="select * from film_info where film_id='$film_id'";
//    echo $sql_txt;
    $result=mysqli_query($conn,$sql_txt);
//    var_dump($result);
//    如果没有下面的语句，得到的将是MySQL查询的信息：object(mysqli_result)#2 (5) { ["current_field"]=> int(0) ["field_count"]=> int(11)
    // ["lengths"]=> NULL ["num_rows"]=> int(1) ["type"]=> int(0) }
    $info=mysqli_fetch_array($result);
//    var_dump($info);输出array(22) { [0]=> string(1) "1" ["film_id"]=> string(1) "1" [1]=> string(16) "速度与激情9"
    // ["film_name"]=> string(16) "速度与激情9" [2]=> string(10) "2021-05-21" ["play_time"]=> string(10) "2021-05-21"
    // [3]=> string(9) "林诣彬" ["director"]=> string(9) "林诣彬" [4]=> string(12) "范迪塞尔" ["actor"]=> string(12) "范迪塞尔"
    // [5]=> string(9) "动作片" ["film_type"]=> string(9) "动作片" [6]=> string(6) "美国" ["make_film_area"]=> string(6) "美国"
    // [7]=> NULL ["make_film_man"]=> NULL [8]=> string(3) "120" ["film_length"]=> string(3) "120"
    // [9]=> NULL ["film_introduce"]=> NULL [10]=> string(1) "1" ["film_play_status"]=> string(1) "1" }
    echo "<br>电影名字：".$info['film_name']."<br>国家/地区：".$info['make_film_area']."<br>上映时间：".$info['play_time']."<br>时长：".$info['film_length'];
    echo "分钟<br>类型：".$info['film_type']."<br>导演：".$info['director']."<br>主演：".$info['actor']."<br>剧情：".$info['film_introduce'];
    $_SESSION['film_name']=$info['film_name'];
//    var_dump($_SESSION['film_name']);
    echo $_SESSION['film_name'];
    ?>
    <br>
    <img src="<?php @$qm->query_sql("select url from film_broadcast_info where film_id='$film_id'",'url')?>" alt="电影配图" id="img" width="62px" height="100px">
    <hr>
    <h2>场次信息</h2>
    <br>
    请选择电影院
    <br>
    <form action="3select/select_hall.php" method="get">
        <select name="电影院" id="cinema">
            <option value="null">--请选择--</option>
            <option value="飞扬影城天河城店">飞扬影城（天河城）</option>
            <option value="飞扬影城正佳广场店">飞扬影城（正佳广场）</option>
            <option value="天河电影城">天河电影城</option>
            <option value="中影国际影城">中影国际影城</option>
            <option value="青宫电影城">青宫电影城</option>
            <option value="中影火山湖电影城">中影火山湖电影城</option>
            <option value="UA IMAX">UA IMAX</option>
        </select>
        <input type="submit" value="查看场次信息">
    </form>

</body>
</html>
<!--参考 https://blog.csdn.net/Jack_PengPeng/article/details/87690101?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.baidujs&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.baidujs -->